package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    int query4Count(QueryObject qo);

    List<Employee> query4List(QueryObject qo);

    Employee getByUsername(String username);

    void changState(Long id);

    void resetPassword(@Param("newPassword") String newPassword, @Param("id") Long id);

    void deleteRelation(Long employeeId);

    void saveRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

    List<Long> getRoleByEmployeeId(Long employeeId);

    List<Employee> selectXls(QueryObject qo);

    List<Employee> getSaleMen();

    List<Employee> getByTeacherRoleSn(String teacherRoleSn);
}